#ifndef SPRITE_EXPLOSION_H
#define SPRITE_EXPLOSION_H

#include "consts.h"
#include "cash.h"


class SPRITE_EXPLOSION : public QGraphicsObject
{
    Q_OBJECT
private:
    QVector<QPixmap*> *vect_pix;

    int index;
    int timer_id;

    int exp_id;

    CASH *cash;

public:
    explicit SPRITE_EXPLOSION(QPointF point, CASH *cash, int explosion_id, QGraphicsItem *parent = 0);
    
    QRectF boundingRect() const;
    QPainterPath shape() const;

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);
    void timerEvent(QTimerEvent *);

    void load();

signals:
    void finished();
    void started();
    void stoped();

public slots:
    void start();
    void stop();
    void slot_run();
    void slot_anim_finished();

};

#endif // SPRITE_EXPLOSION_H
